package org.smr.ministore.micro.client;

import java.util.List;

import org.blade.utils.Pager;
import org.smr.ministore.entities.GoodsSpecification;
import org.smr.ministore.entities.vo.Assign2OrganVO;
import org.smr.ministore.entities.vo.Assign2OrgansVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient("gateway.GoodsSpecification")
public interface FeignGoodsSpecificationMicroServiceClient {

    @RequestMapping(method = RequestMethod.PUT, value = "/GoodsSpecification/batchSave")
    int batchSave(@RequestBody List<GoodsSpecification> entities);

    @RequestMapping(method = RequestMethod.POST, value = "/GoodsSpecification/batchModify")
    int batchModify(@RequestBody List< GoodsSpecification> entities);

    @RequestMapping(method = RequestMethod.PUT, value = "/GoodsSpecification/save")
    public int save(@RequestBody GoodsSpecification entity) ;

    @RequestMapping(method = RequestMethod.PATCH, value = "/GoodsSpecification/updateById")
    public int updateById(@RequestBody GoodsSpecification id);

    @RequestMapping(method = RequestMethod.GET, value = "/GoodsSpecification/queryById/{id}")
    public  GoodsSpecification queryById(@PathVariable("id")Long id);

    @RequestMapping(method = RequestMethod.DELETE, value = "/GoodsSpecification/deleteById/{id}")
    public int deleteById(@PathVariable("id")Long id);

    @RequestMapping(method = RequestMethod.POST, value = "/GoodsSpecification/paginate")
    public Pager<GoodsSpecification> paginate( @RequestBody GoodsSpecification entity, Long pageSize, Long pageNum);

    @ResponseBody
    @RequestMapping( method = RequestMethod.POST, value = "/GoodsSpecification/assign2Organs")
    public int assign(@RequestBody Assign2OrgansVO assignee);

    @ResponseBody
    @RequestMapping( method = RequestMethod.DELETE, value = "/GoodsSpecification/deleteByIdLogical")
    public int deleteByIdLogical(Long id);

    @ResponseBody
    @RequestMapping( method = RequestMethod.POST, value = "/GoodsSpecification/assign2Organ")
    public int assign(@RequestBody Assign2OrganVO goodsAssign2Organ);

    @ResponseBody
    @RequestMapping( method = RequestMethod.POST, value = "/GoodsSpecification/queryByPrimaryKey")
    public GoodsSpecification queryByPrimaryKey(@RequestBody GoodsSpecification goodsSpecification);
}
